<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>elk登录认证配置 | 清峰小栈</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="elk" />
  
  
  
  
  <meta name="description" content="ELK登录认证 当我们安装好ELK后，默认是可以直接访问到kibana的，可以直接查看收集到的信息，这样很不安全。 很多人采用的是Nginx代理来做登录验证功能，这也是一种实现方式，但是我们还有另一种更加优雅的方式，kibana其实有为我们提供认证登录的方式。  下面我将介绍通过kibana认证登录的方式访问elk 实现步骤 1、ES设置密码 2、Kibana设置连接方式 3、Logstash设置">
<meta property="og:type" content="article">
<meta property="og:title" content="ELK登录认证配置">
<meta property="og:url" content="http://example.com/2022/09/21/ELK/ELK%E7%99%BB%E5%BD%95%E8%AE%A4%E8%AF%81%E9%85%8D%E7%BD%AE/index.html">
<meta property="og:site_name" content="清峰小栈">
<meta property="og:description" content="ELK登录认证 当我们安装好ELK后，默认是可以直接访问到kibana的，可以直接查看收集到的信息，这样很不安全。 很多人采用的是Nginx代理来做登录验证功能，这也是一种实现方式，但是我们还有另一种更加优雅的方式，kibana其实有为我们提供认证登录的方式。  下面我将介绍通过kibana认证登录的方式访问elk 实现步骤 1、ES设置密码 2、Kibana设置连接方式 3、Logstash设置">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2022-09-21T15:26:10.503Z">
<meta property="article:modified_time" content="2023-04-28T08:59:27.173Z">
<meta property="article:author" content="清峰">
<meta property="article:tag" content="elk">
<meta name="twitter:card" content="summary">
  

  

  <link rel="icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  <link rel="apple-touch-icon" href="/qingfeng-blog/css/images/mylogo-2.png">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -->
  <link href="/qingfeng-blog/css/font-awesome.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt; src:url("/qingfeng-blog/css/fonts/FuturaPTBold.otf") format("woff");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt-light; src:url("/qingfeng-blog/css/fonts/FuturaPTBook.otf") format("woff");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt-italic; src:url("/qingfeng-blog/css/fonts/FuturaPTBookOblique.otf") format("woff");font-weight:400;font-style:italic;}
}

  </style>
  
<link rel="stylesheet" href="/qingfeng-blog/css/style.css">


  
<script src="/qingfeng-blog/js/jquery-3.1.1.min.js"></script>

  
<script src="/qingfeng-blog/js/bootstrap.js"></script>


  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/qingfeng-blog/css/bootstrap.css" >

  
    
<link rel="stylesheet" href="/qingfeng-blog/css/dialog.css">

  

  

  
    <link rel="stylesheet" href="/qingfeng-blog/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/qingfeng-blog/css/vdonate.css" >
  

<meta name="generator" content="Hexo 6.3.0"></head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 border-width: 0px;  margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="155px" height="90px" alt="Hike News" src="/qingfeng-blog/css/images/mylogo-2.png">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/">首页</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/qingfeng-blog/tags">标签</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="Type something..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/qingfeng-blog/',
        CONTENT_URL: '/qingfeng-blog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/qingfeng-blog/js/insight.js"></script>


</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-ELK/ELK登录认证配置" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
<div id="container">
  <div id="articleInner" class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      ELK登录认证配置
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	<a href="/qingfeng-blog/2022/09/21/ELK/ELK%E7%99%BB%E5%BD%95%E8%AE%A4%E8%AF%81%E9%85%8D%E7%BD%AE/" class="article-date">
	  <time datetime="2022-09-21T15:26:10.503Z" itemprop="datePublished">2022-09-21</time>
	</a>

      
    <a class="article-category-link" href="/qingfeng-blog/categories/ELK/">ELK</a>

      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		PV:<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

      

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="ELK登录认证"><a href="#ELK登录认证" class="headerlink" title="ELK登录认证"></a>ELK登录认证</h2><blockquote>
<p>当我们安装好ELK后，默认是可以直接访问到kibana的，可以直接查看收集到的信息，这样很不安全。</p>
<p>很多人采用的是Nginx代理来做登录验证功能，这也是一种实现方式，但是我们还有另一种更加优雅的方式，kibana其实有为我们提供认证登录的方式。</p>
</blockquote>
<p>下面我将介绍通过kibana认证登录的方式访问elk</p>
<p>实现步骤</p>
<p>1、ES设置密码</p>
<p>2、Kibana设置连接方式</p>
<p>3、Logstash设置连接方式</p>
<h3 id="一、ElasticSearch安全认证"><a href="#一、ElasticSearch安全认证" class="headerlink" title="一、ElasticSearch安全认证"></a>一、ElasticSearch安全认证</h3><p>给es加上用户名和密码（docker启动方法一致）</p>
<h4 id="1、编辑-Elasticsearch-配置文件"><a href="#1、编辑-Elasticsearch-配置文件" class="headerlink" title="1、编辑 Elasticsearch 配置文件"></a>1、编辑 Elasticsearch 配置文件</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#编辑 Elasticsearch 配置文件elasticsearch.yml</span><br><span class="line">vim /etc/elasticsearch/elasticsearch.yml</span><br></pre></td></tr></table></figure>

<h4 id="2、加上开启验证功能配置"><a href="#2、加上开启验证功能配置" class="headerlink" title="2、加上开启验证功能配置"></a>2、加上开启验证功能配置</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"># 开启密码</span><br><span class="line">xpack.security.transport.ssl.enabled: true</span><br><span class="line">xpack.security.enabled: true</span><br></pre></td></tr></table></figure>

<h4 id="3、保存重启-Elasticsearch-服务"><a href="#3、保存重启-Elasticsearch-服务" class="headerlink" title="3、保存重启 Elasticsearch 服务"></a>3、保存重启 Elasticsearch 服务</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">systemctl restart elasticsearch</span><br><span class="line">或者</span><br><span class="line">docker restart xxx</span><br></pre></td></tr></table></figure>

<h4 id="4、设置密码"><a href="#4、设置密码" class="headerlink" title="4、设置密码"></a>4、设置密码</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">1、linux版</span><br><span class="line">sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive</span><br><span class="line">2、docker版</span><br><span class="line"># 进入docker </span><br><span class="line">docker exec -it elk /bin/bash</span><br><span class="line">cd /opt/elasticsearch/bin</span><br><span class="line"># 手动设置密码</span><br><span class="line">./elasticsearch-setup-passwords interactive</span><br></pre></td></tr></table></figure>

<p>在后面的提示中配置密码，配置密码即可, 会有很多个密码， 建议都配一样的</p>
<h4 id="5、验证是否生效"><a href="#5、验证是否生效" class="headerlink" title="5、验证是否生效"></a>5、验证是否生效</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"> 1、直接访问浏览器是否提示需要输入认证信息</span><br><span class="line">127.0.0.1：9200</span><br><span class="line"> 或者</span><br><span class="line"> 2、命令提示是否未认证报错</span><br><span class="line"> curl 127.0.0.1:9200</span><br></pre></td></tr></table></figure>

<h3 id="二、Kibana安全认证"><a href="#二、Kibana安全认证" class="headerlink" title="二、Kibana安全认证"></a>二、Kibana安全认证</h3><p>此处有两种方法：</p>
<h4 id="1、方法一"><a href="#1、方法一" class="headerlink" title="1、方法一"></a>1、方法一</h4><p>在 <code>kibana.yml</code> 文件中填写连接ES的用户凭证，</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"># elk体系有很多的用户组，elastic是默认的用户组之一，可以使用默认的用户，也可以自定义用户</span><br><span class="line">elasticsearch.username: &quot;elastic&quot; </span><br><span class="line">elasticsearch.password: &quot;1qaz@WSX3edc&quot;</span><br></pre></td></tr></table></figure>

<h4 id="2、方法二"><a href="#2、方法二" class="headerlink" title="2、方法二"></a>2、方法二</h4><p>如果你不想将用户ID和密码放在kibana.yml文件中明文配置，可以将它们存储在密钥库中。运行以下命令以创建Kibana密钥库并添加配置</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">./bin/kibana-keystore create</span><br><span class="line">./bin/kibana-keystore add elasticsearch.username</span><br><span class="line">【输入elasticsearch用户名】</span><br><span class="line">./bin/kibana-keystore add elasticsearch.password</span><br><span class="line">【输入elasticsearch的密码】</span><br></pre></td></tr></table></figure>

<h4 id="3、重启服务"><a href="#3、重启服务" class="headerlink" title="3、重启服务"></a>3、重启服务</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">systemctl restart kibana</span><br><span class="line">或者</span><br><span class="line">docker restart xxx</span><br></pre></td></tr></table></figure>

<h4 id="4、、验证是否生效"><a href="#4、、验证是否生效" class="headerlink" title="4、、验证是否生效"></a>4、、验证是否生效</h4><p>浏览器中输入kibana的地址，如<a target="_blank" rel="noopener" href="http://127.0.0.1:5601/%EF%BC%8C%E8%BF%9B%E5%85%A5%E9%A1%B5%E9%9D%A2">http://127.0.0.1:5601/，进入页面</a></p>
<h3 id="三、Logstash安全认证"><a href="#三、Logstash安全认证" class="headerlink" title="三、Logstash安全认证"></a>三、Logstash安全认证</h3><h4 id="1、修改Logstash配置文件"><a href="#1、修改Logstash配置文件" class="headerlink" title="1、修改Logstash配置文件"></a>1、修改Logstash配置文件</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">vim /etc/logstash/conf.d/30-elasticsearch-output.conf </span><br><span class="line">#有的不叫这个，具体叫啥根据事实而定</span><br><span class="line">vim /etc/logstash/conf.d/xxx.com</span><br></pre></td></tr></table></figure>

<h4 id="2、添加es账号和密码"><a href="#2、添加es账号和密码" class="headerlink" title="2、添加es账号和密码"></a>2、添加es账号和密码</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">output &#123;</span><br><span class="line">  elasticsearch &#123;</span><br><span class="line">    hosts =&gt; [&quot;localhost:9200&quot;]</span><br><span class="line">    user  =&gt; &quot;elastic&quot;</span><br><span class="line">    password  =&gt; &quot;123456&quot;</span><br><span class="line">    manage_template =&gt; false</span><br><span class="line">    index =&gt; &quot;%&#123;[@metadata][beat]&#125;-%&#123;[@metadata][version]&#125;-%&#123;+YYYY.MM.dd&#125;&quot;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h4 id="3、重启服务-1"><a href="#3、重启服务-1" class="headerlink" title="3、重启服务"></a>3、重启服务</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">systemctl restart logstash</span><br><span class="line">或者</span><br><span class="line">docker restart xxx</span><br></pre></td></tr></table></figure>

<p><strong>ELK的密码认证方式到此成功设置完毕</strong></p>
<h3 id="四、修改用户密码（可选）"><a href="#四、修改用户密码（可选）" class="headerlink" title="四、修改用户密码（可选）"></a>四、修改用户密码（可选）</h3><p>在 “管理” 里面可以看见多了个“安全性”</p>
<p>可以修改“用户&#x2F;角色”的密码以及创建“新用户&#x2F;角色”。</p>

      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>


<script src="/qingfeng-blog/js/vdonate.js"></script>

<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150832.png',
  alipayImage: 'http://img.lindaifeng.vip/typora-picgo-tuchaung/20230428150823.png'
});
</script>
      
      
      <div>
        <ul class="post-copyright">
          <li class="post-copyright-author">
          <strong>Post author:  </strong>清峰</a>
          </li>
          <li class="post-copyright-link">
          <strong>Post link:  </strong>
          <a href="/qingfeng-blog/2022/09/21/ELK/ELK登录认证配置/" target="_blank" title="ELK登录认证配置">http://example.com/2022/09/21/ELK/ELK登录认证配置/</a>
          </li>
          <li class="post-copyright-license">
            <strong>Copyright Notice:   </strong>
            All articles in this blog are licensed under <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">CC BY-NC-ND 4.0</a>
            unless stating additionally.
          </li>
         
        </ul>
<div>

      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8yOTQ4MS82MDQ5">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      
        
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/qingfeng-blog/tags/elk/" rel="tag">elk</a></li></ul>

      

    </footer>
  </div>
</div>
  
    
<nav id="article-nav">
  
    <a href="/qingfeng-blog/2022/09/26/Mac/M1%20Docker%E5%90%84%E5%BA%94%E7%94%A8%E5%AE%89%E8%A3%85%EF%BC%88%E6%B1%87%E6%80%BB%EF%BC%89/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          M1 Docker各应用安装（汇总）
        
      </div>
    </a>
  
  
    <a href="/qingfeng-blog/2022/08/19/Nginx/Nginx%E9%85%8D%E7%BD%AE%E8%AE%BF%E9%97%AE%E5%AF%86%E7%A0%81/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Nginx配置访问密码</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
        <ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#ELK%E7%99%BB%E5%BD%95%E8%AE%A4%E8%AF%81"><span class="nav-number">1.</span> <span class="nav-text">ELK登录认证</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E3%80%81ElasticSearch%E5%AE%89%E5%85%A8%E8%AE%A4%E8%AF%81"><span class="nav-number">1.1.</span> <span class="nav-text">一、ElasticSearch安全认证</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E7%BC%96%E8%BE%91-Elasticsearch-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-number">1.1.1.</span> <span class="nav-text">1、编辑 Elasticsearch 配置文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E5%8A%A0%E4%B8%8A%E5%BC%80%E5%90%AF%E9%AA%8C%E8%AF%81%E5%8A%9F%E8%83%BD%E9%85%8D%E7%BD%AE"><span class="nav-number">1.1.2.</span> <span class="nav-text">2、加上开启验证功能配置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E4%BF%9D%E5%AD%98%E9%87%8D%E5%90%AF-Elasticsearch-%E6%9C%8D%E5%8A%A1"><span class="nav-number">1.1.3.</span> <span class="nav-text">3、保存重启 Elasticsearch 服务</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4%E3%80%81%E8%AE%BE%E7%BD%AE%E5%AF%86%E7%A0%81"><span class="nav-number">1.1.4.</span> <span class="nav-text">4、设置密码</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5%E3%80%81%E9%AA%8C%E8%AF%81%E6%98%AF%E5%90%A6%E7%94%9F%E6%95%88"><span class="nav-number">1.1.5.</span> <span class="nav-text">5、验证是否生效</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81Kibana%E5%AE%89%E5%85%A8%E8%AE%A4%E8%AF%81"><span class="nav-number">1.2.</span> <span class="nav-text">二、Kibana安全认证</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E6%96%B9%E6%B3%95%E4%B8%80"><span class="nav-number">1.2.1.</span> <span class="nav-text">1、方法一</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E6%96%B9%E6%B3%95%E4%BA%8C"><span class="nav-number">1.2.2.</span> <span class="nav-text">2、方法二</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E9%87%8D%E5%90%AF%E6%9C%8D%E5%8A%A1"><span class="nav-number">1.2.3.</span> <span class="nav-text">3、重启服务</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4%E3%80%81%E3%80%81%E9%AA%8C%E8%AF%81%E6%98%AF%E5%90%A6%E7%94%9F%E6%95%88"><span class="nav-number">1.2.4.</span> <span class="nav-text">4、、验证是否生效</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81Logstash%E5%AE%89%E5%85%A8%E8%AE%A4%E8%AF%81"><span class="nav-number">1.3.</span> <span class="nav-text">三、Logstash安全认证</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1%E3%80%81%E4%BF%AE%E6%94%B9Logstash%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"><span class="nav-number">1.3.1.</span> <span class="nav-text">1、修改Logstash配置文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2%E3%80%81%E6%B7%BB%E5%8A%A0es%E8%B4%A6%E5%8F%B7%E5%92%8C%E5%AF%86%E7%A0%81"><span class="nav-number">1.3.2.</span> <span class="nav-text">2、添加es账号和密码</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3%E3%80%81%E9%87%8D%E5%90%AF%E6%9C%8D%E5%8A%A1-1"><span class="nav-number">1.3.3.</span> <span class="nav-text">3、重启服务</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E4%BF%AE%E6%94%B9%E7%94%A8%E6%88%B7%E5%AF%86%E7%A0%81%EF%BC%88%E5%8F%AF%E9%80%89%EF%BC%89"><span class="nav-number">1.4.</span> <span class="nav-text">四、修改用户密码（可选）</span></a></li></ol></li></ol>
    
    </div>
  </aside>


</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <!-- <p> Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/iTimeTraveler/hexo-theme-hiker" target="_blank">Hexo-theme-hiker</a> </p> -->
	      <p>May there be no bug in the world！</p>
        <p id="copyRightEn">Copyright &copy; 2022 - 2023 All Rights Reserved.</p>
	      
	      
    		<p class="busuanzi_uv">
				UV : <span id="busuanzi_value_site_uv"></span> |  
				PV : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/qingfeng-blog/" class="mobile-nav-link">首页</a>
  
    <a href="/qingfeng-blog/categories" class="mobile-nav-link">分类</a>
  
    <a href="/qingfeng-blog/tags" class="mobile-nav-link">标签</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  
<link rel="stylesheet" href="/qingfeng-blog/fancybox/jquery.fancybox.css">

  
<script src="/qingfeng-blog/fancybox/jquery.fancybox.pack.js"></script>




<script src="/qingfeng-blog/js/scripts.js"></script>



  
<script src="/qingfeng-blog/js/home.js"></script>




  
<script src="/qingfeng-blog/js/dialog.js"></script>









	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            清峰小栈
          </div>
          <div class="panel-body">
            Copyright © 2023 清峰 All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/qingfeng-blog/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>